/* 重置一些默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;                /* 让body成为flex容器 */
  flex-direction: column;       /* 使得子元素在竖直方向排列 */
  height: 100vh;                /* 让body占满整个视口高度 */
}

.navbar, .sidebar {
  background-color: #2c3e50;
  color: white;
}

.navbar {
  width: 100%;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  font-size: 1.5rem;
}

.navbar .user-info {
  display: flex;
  align-items: center;
}

.navbar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.sidebar {
  width: 250px;
  height: 100vh;
  padding-top: 20px;
  position: fixed; /* 使sidebar固定在左侧 */
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li a {
  display: block;
  padding: 10px;
  color: white;
  text-decoration: none;
  margin: 5px 0;
}

.sidebar ul li a:hover {
  background-color: #34495e;
}

main {
  margin-left: 250px;           /* 给main留出左侧sidebar的空间 */
  padding: 20px;
  flex-grow: 1;                 /* 让main内容区域占据剩余空间 */
}

section {
  background-color: white;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

table th, table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

button {
  padding: 10px 15px;
  background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  margin-top: 10px;
}

button:hover {
  background-color: #2980b9;
}

.footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 10px 0;
  margin-top: auto;             /* 将footer推到页面底部 */
}

.footer a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
}

.footer a:hover {
  text-decoration: underline;
}

.stat-item {
  display: inline-block;
  width: 30%;
  padding: 10px;
  background-color: #ecf0f1;
  border-radius: 5px;
  margin-right: 10px;
}

.stat-item h3 {
  font-size: 1.1rem;
}

.search-box {
  margin-bottom: 15px;
}

.search-box input {
  padding: 8px;
  width: 250px;
}

.search-box button {
  padding: 8px;
  background-color: #27ae60;
  color: white;
  border: none;
}
